<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>w0924_2_condition</title>
		<script>
			document.write('<pre>');
			/* Date객체--------------------------------- */
			//특정 날짜와 시간
			var d1 = new Date('December 9, 2014 17:10:00');
			document.writeln('d1:' +d1.toLocaleString());
			
			//var d = new Date(milliseconds);
			var d2 = new Date(0);
			document.writeln('d2: ' +d2.toLocaleString());

			//new Date(year, month, day, hours, minutes, seconds, milliseconds); 
			//month에서 1월은 0 
			var d3 = new Date(2014, 6, 1, 13, 34, 45);
			document.writeln('d3: ' +d3.toLocaleString());
			document.writeln('<hr/>');

				
			document.writeln('getFullYear:' + d3.getFullYear());
			document.writeln('getMonth:' + (d3.getMonth()+1));
			document.writeln('getDate:' + d3.getDate());
			document.writeln('getHours:' + d3.getHours());
			document.writeln('getMinutes:' + d3.getMinutes());
			document.writeln('getSeconds:' + d3.getSeconds());
			document.writeln('getMilliseconds:' + d3.getMilliseconds());
			document.writeln('getTime:' + d3.getTime());
	

			document.writeln('<hr/>');
			
			
			
			document.writeln('<hr/>');
			//현재 날짜와 시간
			var today = new Date();
			
				document.writeln('today: ' + today +' 타입:'+ typeof today);
				document.writeln('today.toString(): ' + today.toString()+ typeof today.toString());	
				document.writeln('today.toUTCString(): ' + today.toUTCString()+ typeof today.toUTCString());
				document.writeln('today.toLocaleString():' + today.toLocaleString() + typeof today.toLocaleString());
				document.writeln('');
			document.write('</pre>');
		</script>
	
	</head>

	<body>
	
	</body>
</html>
